home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / math / lifemake.cpt / LifeMaker Demo.rsrc / LIF2_27265_Polygon < prev    next >
Encoding:
Text File  |  1991-07-16  |  293 b   |  12 lines

  1. RULE Polygon
  2.    VAR sum, new
  3. BEGIN  
  4.    sum := north[0] + NE[0] + east[0] + SE[0] + south[0] + SW[0] + west[0] + NW[0]
  5.    IF center[0] THEN
  6.       new := (sum = 0) OR ((sum >= 3) AND (sum <= 6))
  7.    ELSE
  8.       new := (sum = 3) OR (sum = 4)
  9.    END
  10.    new := new + 2*center[0]
  11.    RETURN new
  12. END